package com.eos.control.action.report.commission;

import java.util.ArrayList;
import java.util.List;

import com.eos.common.tool.DataCacheUtil;
import com.eos.control.action.base.AbstractBaseAction;
import com.eos.orm.mybatis.model.SysCustomer;

public class UploadCommissionExcelAction extends AbstractBaseAction {
	private static final long serialVersionUID = 2933682783951123795L;
	private List<SysCustomer> customerList;
	
	public List<SysCustomer> getCustomerList() {
		return customerList;
	}

	@Override
	public String execute(){
		try{
			List<SysCustomer> cuList = DataCacheUtil.getAllSysCustomer();
			List<SysCustomer> tempList = null;
			if(null != cuList){
				tempList = new ArrayList<SysCustomer>();
				 for(SysCustomer cu : cuList){
					 if(cu.getCustomerType().equals("0")){ //0: 结算客户
						 tempList.add(cu);
					 }
				 }
				 customerList = tempList;
			}
		}catch (Exception e) {
			e.printStackTrace();
		}
		return SUCCESS;
	}

}
